package com.easyfile.easyfilemaster.entity.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.easyfile.easyfilemaster.entity.UserDetail;
import com.easyfile.easyfilemaster.entity.annotations.Sex;
import com.easyfile.easyfilemaster.entity.base.ValidateRegex;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;


/**
 * 更新用户信息
 * @author chenpeman
 */
@Data
public class UpdateUserDto {
    private Long userId;

    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = ValidateRegex.USERNAME,message = "用户名不合法")
    private String username;

    @Sex
    @NotBlank(message = "性别不能为空")
    private String sex;

    @Max(10737418240L)
    @Min(1024)
    @NotNull(message = "容量不为空")
    private Double maxCapacity;
}
